import db from '../libs/database';
import Sequelize from 'sequelize';

const Orders = db.define('orders', {
  imgUrl: {
    type: Sequelize.STRING,
    field: 'img_url'
  },
  ordersId: {
    type: Sequelize.STRING
  },
  name: {
    type: Sequelize.STRING
  },
  price: {
    type: Sequelize.FLOAT
  },
  targetSite: {
    type: Sequelize.STRING,
    field: 'target_site'
  },
  uId: {
    type: Sequelize.STRING
  },
  num: {
    type: Sequelize.INTEGER
  },
  logistics: {
   type: Sequelize.STRING
  }
}, {
  freezeTableName: true // Model 对应的表名将与model名相同
});

Orders.sync()
// Orders.sync({force: true})

export default Orders
